<ol class="breadcrumb">
  <li>
    <a class="badge badge-type" href="#">Master</a>
  </li>
  <li class="active">
    <span class="badge badge-type">Agents</span>
  </li>
</ol>

<table m-table table-content="agents" title="Agents"
  class="table table-striped table-bordered table-condensed">
  <thead>
    <tr>
      <th data-key="id">ID</th>
      <th data-key="hostname">Host</th>
      <th data-key="resources.cpus">CPUs (Allocated / Total)</th>
      <th data-key="resources.gpus">GPUs (Allocated / Total)</th>
      <th data-key="resources.mem">Mem (Allocated / Total)</th>
      <th data-key="resources.disk">Disk (Allocated / Total)</th>
      <th data-key="registered_time">Registered</th>
      <th data-key="reregistered_time">Re-Registered</th>
    </tr>
  </thead>
  <tr ng-repeat="agent in $data">
    <td>
      <a href="#/agents/{{agent.id}}">{{agent.id | truncateMesosID}}</a>
      <button class="btn btn-xs btn-default btn-toggle"
          clipboard
          data-clipboard-text="{{agent.id}}"
          tooltip="Copy ID"
          tooltip-placement="right"
          tooltip-trigger="clipboardhover">
        <i class="icon-file"></i>
      </button>
    </td>
    <td>{{agent.hostname}}</td>
    <td>
      {{agent.used_resources.cpus | number}} / {{agent.resources.cpus | number}}
    </td>
    <td>
      {{agent.used_resources.gpus | number}} / {{agent.resources.gpus | number}}
    </td>
    <td>
      {{agent.used_resources.mem * (1024 * 1024) | dataSize}} / {{agent.resources.mem * (1024 * 1024) | dataSize}}
    </td>
    <td>
      {{agent.used_resources.disk * (1024 * 1024) | dataSize}} / {{agent.resources.disk * (1024 * 1024) | dataSize}}
    </td>
    <td>
      <m-timestamp value="{{agent.registered_time * 1000}}"></m-timestamp>
    </td>
    <td>
      <m-timestamp value="{{agent.reregistered_time * 1000}}"></m-timestamp>
    </td>
  </tr>
</table>
